# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=font-noto-emoji
pkgver=0_git20200721
_commit="d5e261484286d33a1fe8a02676f5907ecc02106f"
pkgrel=0
pkgdesc="Google Noto emoji fonts"
url="https://github.com/googlefonts/noto-emoji"
arch="noarch !mips !mips64" # fails to build on mips
license="OFL-1.1"
makedepends="optipng py3-fonttools cairo-dev imagemagick
	py3-setuptools bash nototools libpng-dev python3
	pngquant zopfli"
source="$pkgname-$pkgver.tar.gz::https://github.com/googlei18n/noto-emoji/archive/$_commit.tar.gz
	0001-Makefile-make-check_sequence-a-order-only-prerequisi.patch"
options="!check" # No code to test
builddir="$srcdir/noto-emoji-$_commit"

build() {
	make VIRTUAL_ENV=False BYPASS_SEQUENCE_CHECK=True
}

package() {
	# Fonts in the fonts/ subdirectory are pre-built.
	# TODO: Figure out if we can build NotoEmoji-Regular.ttf too somehow
	mkdir -p "$pkgdir"/usr/share/fonts/noto
	install -m644 NotoColorEmoji.ttf fonts/NotoEmoji-Regular.ttf \
		"$pkgdir"/usr/share/fonts/noto
}

sha512sums="9b3960151114e57b94d698d1dc9d794da97d7061bf60e24f6b2513c40ef73bcd8db4b239c60719adf102a825713dc3086a825d1e58e2000f1b00438b8795d75e  font-noto-emoji-0_git20200721.tar.gz
ee2c7cfdbc1f24d0133cd87b8db0d8b25a2841942b599ff8bccbc376acdd82a35e022d07df3b73d198d634d368724d8fd4d3bfcd21e457b5300a66e1e24fdb53  0001-Makefile-make-check_sequence-a-order-only-prerequisi.patch"
